#include <iostream>
#include <string>
#include <tuple>
// #include <format>

using namespace std;

int main()
{
	tuple t1{16, "Test"s, true}; // Using CTAD
	// Or:
	// tuple<int, string, bool> t1{ 16, "Test", true };

	auto [i, str, b]{t1};
	// cout << format("Decomposed: i = {}, str = \"{}\", b = {}", i, str, b) << endl;
	printf("Decomposed: i = %d, str = \"%s\", b = %d\n", i, str.c_str(), b);

	auto &[i2, str2, b2]{t1};
	i2 *= 2;
	str2 = "Hello World";
	b2 = !b2;
	printf("Decomposed: i2 = %d, str2 = \"%s\", b2 = %d\n", i2, str2.c_str(), b2);
}